<?php
function submit_to_gwired($id) {
	$event = get_event($id);
	$user = get_user(get_user_by_event($event['id']));
	$sdate = explode_date($event['startdate']);
	$stime = explode_time($event['starttime']);
	$edate = explode_date($event['enddate']);
	$etime = explode_time($event['endtime']);
	$fields = array(
			"e_ea" => "e",
			"e_title" => $event['title'],
			"e_sponsor" => "via Colonial Calendar",
			"e_description" => $event['desc'],
			"start_month" => $start['month'],
			"start_day" => $start['day'],
			"start_year" => $start['year'],
			"start_hour" => $start['hour'],
			"start_minute" => $star['minute'],
			"start_ampm" => $start['ampm'],
			"e_start_date" => "",
			"e_end_date" => "",
			"end_month" => $end['month'],
			"end_day" => $end['day'],
			"end_year" => $end['year'],
			"end_hour" => $end['hour']
			"end_minute" => $end['minute'],
			"end_ampm" => $end['ampm'],
			"rain_month" => 0,
			"rain_day" => 0,
			"rain_year" => 2009,
			"rain_hour" => 1,
			"rain_minute" => 00,
			"rain_ampm" => "am",
			"e_contact_email" => $user['email'] . "@gwmail.gwu.edu",
			"types_list" => "2"
			"occasions_list" => ""
			"add_ann" => "yes"
			"Submit" => "Submit your event"
		)
	$url = "http://gwired.gwu.edu/submit4.php"
	foreach($fields as $key=>$value) { 
		$fields_string .= $key.'='.urlencode($value).'&'; 
	}
	rtrim($fields_string,'&');
	$ch = curl_init();
	curl_setopt($ch,CURLOPT_URL,$url);
	curl_setopt($ch,CURLOPT_POST,count($fields));
	curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
	$result = curl_exec($ch);
	curl_close($ch);
}